home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / SLGetPrinterList.z / SLGetPrinterList
Text File  |  1998-10-30  |  9KB  |  198 lines

  1.  
  2.  
  3.  
  4. SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((3333))))              IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo               SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SLGetPrinterList, SLGetPrinterInfo - get printer information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssppppoooooooollll....hhhh>>>>
  13.  
  14.      iiiinnnntttt SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((SSSSLLLLPPPPrrrriiiinnnntttteeeerrrrSSSSttttrrrruuuucccctttt ****pppprrrriiiinnnntttteeeerrrrsssspppp[[[[]]]],,,,
  15.                           iiiinnnntttt ****nnnnuuuummmm____pppprrrriiiinnnntttteeeerrrrsssspppp))));;;;
  16.      iiiinnnntttt SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrIIIInnnnffffoooo((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****pppprrrriiiinnnntttteeeerrrr,,,,
  17.                           SSSSLLLLPPPPrrrriiiinnnntttteeeerrrrSSSSttttrrrruuuucccctttt ********ppppiiiinnnnffffoooo))));;;;
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _S_L_G_e_t_P_r_i_n_t_e_r_L_i_s_t returns a list of the printers registered with the
  21.      default spooling system.  _p_r_i_n_t_e_r_s_p is set by the function to point to a
  22.      list of _S_L_P_r_i_n_t_e_r_S_t_r_u_c_t structures. These structures contain detailed
  23.      information about each printer.  _n_u_m__p_r_i_n_t_e_r_s_p is set to the number of
  24.      printers in the list.  The returned list of printers is sorted
  25.      alphabetically according to the _l_o_c_a_l__n_a_m_e field. The sort is case
  26.      independent.
  27.  
  28.      _S_L_G_e_t_P_r_i_n_t_e_r_I_n_f_o returns information about a single printer.  _p_r_i_n_t_e_r
  29.      specifies the name of the printer for which information is desired. If
  30.      _p_r_i_n_t_e_r is NNNNUUUULLLLLLLL, the default printer will be used.  _p_i_n_f_o is set by the
  31.      function to point to a _S_L_P_r_i_n_t_e_r_S_t_r_u_c_t structure containing the
  32.      information about the printer.
  33.  
  34.      The _S_L_P_r_i_n_t_e_r_S_t_r_u_c_t is defined as:
  35.  
  36.           typedef struct _slPrinterStruct {
  37.               char *local_name;             /* Local printer name       */
  38.               char *formal_name;            /* Formal printer name      */
  39.               char *type;                   /* Printer type (eg. Color) */
  40.               char *dev;                    /* Port name (eg. /dev/plp) */
  41.               unsigned int is_def: 1;       /* 1 == default printer     */
  42.               unsigned int is_class: 1;     /* 1 == printer is class    */
  43.               unsigned int is_networked: 1; /* 1 == network printer     */
  44.               unsigned int _padding: 29;    /* Unused - for alignment   */
  45.               char *remote_host;            /* Remote machine name      */
  46.               char *remote_name;            /* Remote printer name      */
  47.               char *network_type;           /* Remote machine type      */
  48.           } SLPrinterStruct;
  49.  
  50.  
  51. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  52.      0 is returned if execution was successful. -1 is returned and _S_L_e_r_r_n_o is
  53.      set if an execution error has occurred.
  54.  
  55. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  56.      _S_L_G_e_t_P_r_i_n_t_e_r_L_i_s_t and _S_L_G_e_t_P_r_i_n_t_e_r_I_n_f_o will fail under the following
  57.      circumstances.
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((3333))))              IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo               SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((3333))))
  69.  
  70.  
  71.  
  72.      SL_ERR_FIND_SPOOLER      An error occurred while attempting to determine
  73.                               the available printer spooling systems.
  74.  
  75.      SL_ERR_NO_SPOOLERS       There are no printer spooling systems available.
  76.  
  77.  
  78.      In addition, _S_L_G_e_t_P_r_i_n_t_e_r_I_n_f_o will fail under the following conditions.
  79.  
  80.      SL_ERR_NO_DEF_PRINTER    There is no default printer registered with the
  81.                               printer spooling system.
  82.  
  83.      SL_ERR_BAD_PRINTER_NAME  The printer name specified is either an empty
  84.                               string (""), or a string consisting entirely of
  85.                               whitespace.
  86.  
  87.      SL_ERR_BAD_CLASS_MEMBER  The specified printer class contains an invalid
  88.                               printer.
  89.  
  90. WWWWAAAARRRRNNNNIIIINNNNGGGG
  91.      A pointer to _p_r_i_n_t_e_r_s_p obtained by a previous call to _S_L_G_e_t_P_r_i_n_t_e_r_L_i_s_t
  92.      will be invalid after subsequent calls to the function. The contents of
  93.      the printer list _p_r_i_n_t_e_r_s_p must be copied to be preserved. Note that the
  94.      character string fields of the structure must be duplicated in any copy
  95.      operation since these pointers also become invalid. Similarly, the
  96.      contents of the structure pointed to by _p_i_n_f_o will not be preserved
  97.      across calls to _S_L_G_e_t_P_r_i_n_t_e_r_I_n_f_o.
  98.  
  99. NNNNOOOOTTTTEEEESSSS
  100.      The following notes refer to BSD and System V systems to indicate the use
  101.      of the BSD and System V printer spooling systems respectively. All
  102.      mention of "fields" refers to the fields of the _S_L_P_r_i_n_t_e_r_S_t_r_u_c_t
  103.      structure.
  104.  
  105.      1.   On BSD systems it is assumed that the _f_o_r_m_a_l__n_a_m_e field is the last
  106.           printer name to appear in the /_e_t_c/_p_r_i_n_t_c_a_p entry printer name list.
  107.  
  108.      2.   On any spooling system, if the _f_o_r_m_a_l__n_a_m_e cannot be determined it
  109.           will be set to the value of _t_y_p_e.
  110.  
  111.      3.   On BSD systems the printer type (_t_y=) may not be specified in the
  112.           /_e_t_c/_p_r_i_n_t_c_a_p file entry for the printer. In that case the _t_y_p_e
  113.           field will be set to the string "Unknown".
  114.  
  115.      4.   If a printer is not physically connected to the user's workstation,
  116.           but is accessed over the network, the printer is called a networked
  117.           printer. If a printer is networked, the _d_e_v field will be set to a
  118.           NNNNUUUULLLLLLLL pointer.
  119.  
  120.      5.   If the printer is physically connected to the user's workstation, it
  121.           is called a local printer. If a printer is local, the _r_e_m_o_t_e__h_o_s_t,
  122.           _r_e_m_o_t_e__n_a_m_e, and _n_e_t_w_o_r_k__t_y_p_e fields will be set to the NNNNUUUULLLLLLLL
  123.           pointer.
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134. SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((3333))))              IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo               SSSSLLLLGGGGeeeettttPPPPrrrriiiinnnntttteeeerrrrLLLLiiiisssstttt((((3333))))
  135.  
  136.  
  137.  
  138.      6.   On BSD systems one physical printer can be referred to by many
  139.           names.  Therefore, it is possible for more than one printer in the
  140.           printer list to be marked as the default printer (i.e. _d_e_f = 1).
  141.  
  142.      7.   On System V systems the _i_s__c_l_a_s_s field is set to 1 if the printer is
  143.           actually a printer class rather than an actual physical printer. On
  144.           BSD systems this field is always set to 0.
  145.  
  146. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  147.      SLGetDefPrinterName(3), SLPerror(3), libspool(3)
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                                                                         PPPPaaaaggggeeee 3333
  194.  
  195.  
  196.  
  197.